package io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class Demo1 {
    public static void main(String[] args) throws IOException {
        //文件赋值，就是边读边写
        //创建字节输入流，读
        FileInputStream fis = new FileInputStream("C:\\Users\\1\\Desktop\\src\\a.txt");
        //字节输出流，写
        FileOutputStream fos = new FileOutputStream("Day12\\abc");

        int len ;
        while ((len =fis.read())!=-1){
            fos.write(len);
        }
        fis.close();
        fos.close();
    }
}
